router: rename router_clear_ra_pio
authorÁlvaro Fernández Rojas <[email protected]>
Wed, 3 Dec 2025 07:26:33 +0000 (08:26 +0100)
committerÁlvaro Fernández Rojas <[email protected]>
Thu, 4 Dec 2025 14:40:44 +0000 (15:40 +0100)
This function clears the expired RA PIOs, so router_clear_expired_ra_pio
is a better name.

Link: https://github.com/openwrt/odhcpd/pull/336
Signed-off-by: Álvaro Fernández Rojas <[email protected]>
src/router.c

index 31a4c339f5a49ea9231f2ba38a523ea55ea801eb..63bb3db646733c6e4207cea8f09bd1a3a3ffc444 100644 (file)
@@ -526,7 +526,7 @@ static void router_add_ra_pio(struct interface *iface,
             pio->length);
 }
 
-static void router_clear_ra_pio(time_t now,
+static void router_clear_expired_ra_pio(time_t now,
        struct interface *iface)
 {
        size_t i = 0, pio_cnt = iface->pio_cnt;
@@ -536,7 +536,7 @@ static void router_clear_ra_pio(time_t now,
                struct ra_pio *cur_pio = &iface->pios[i];
 
                if (ra_pio_expired(cur_pio, now)) {
-                       info("rfc9096: %s: clear %s/%u",
+                       info("rfc9096: %s: clear expired %s/%u",
                             iface->ifname,
                             inet_ntop(AF_INET6, &cur_pio->prefix, ipv6_str, sizeof(ipv6_str)),
                             cur_pio->length);
@@ -611,7 +611,7 @@ static int send_router_advert(struct interface *iface, const struct in6_addr *fr
        bool valid_prefix = false;
        char buf[INET6_ADDRSTRLEN];
 
-       router_clear_ra_pio(now, iface);
+       router_clear_expired_ra_pio(now, iface);
 
        memset(&adv, 0, sizeof(adv));
        adv.h.nd_ra_type = ND_ROUTER_ADVERT;